Skip to content
  • 0 Votes
    3 Posts
    495 Views
    bibasmallB

    @SGaist,
    Qt 6.3.2, Windows 10.

    I found that winapi coordinates I got eventually turned out to be different from QCursor::pos() when talking about switching between different scales. So I decided to use QCursor::pos() instead, and it helped:

    QPoint globalCursorPos = QCursor::pos(); auto menuGeom = ui.qMenuBarMain->geometry().translated(ui.qMenuBarMain->mapToGlobal(QPoint(0, 0))); if (menuGeom.contains(globalCursorPos)) //some work
  • 1 Votes
    7 Posts
    3k Views
    fra87F

    Ok, did some tests and it seems that setting the windows:dpiawareness to 0 or 1 fixes the problem.

    But... The problem is, the form is much more readable with the scaling at 2, since it is almost the same size on both monitors. The problem is that while the font size increases, the local sizes don't. And so the labels are cropped.

    In my opinion, a much better scaling would be to increase also the linear sizes, so that the whole window has almost the same size on both monitors.

    I don't know if I could explain well my opinion...